vtag=function(){
    if(arguments.length==2){
        console.log({tag:arguments[0],attrs:"",children:arguments[1]});
        return {tag:arguments[0],attrs:{},children:arguments[1]}
    }
    return {tag:arguments[0],attrs:arguments[1],children:arguments[2]}
}

var renderHandler=function(dom,vnode){
    console.log(vnode);
    var truthTag=document.createElement(vnode.tag);
    for(var key in vnode.attrs){
        truthTag.setAttribute(key,vnode.attrs[key]);
    }
    truthTag.innerText=vnode.children;
    dom.appendChild(truthTag);
}

m=function(){
    return vtag.apply(this,arguments);
}
m.render=renderHandler;

if (typeof module !== "undefined")
    module["exports"] = m
else 
    window.m = m